<!DOCTYPE html>
<html>
<head>
  <script src="../media-file.js"></script>
  <script src="../video-paint-test.js"></script>
</head>
<body>
  <p>Test overlay cast button rendering on dark background.</p>
  <div>
    <video></video>
  </div>
  <div>
    <video style="width: 320px;"></video>
  </div>
  <div>
    <video style="position: absolute; width: 320px;"></video>
  </div>
  <script>
    var videos = document.getElementsByTagName('video');
    waitForMultipleEvents("canplaythrough", videos.length, function() {
        waitForMultipleEvents("seeked", videos.length, function() {
            if (window.testRunner)
                testRunner.notifyDone();
        });
        for (var i = 0; i < videos.length; ++i) {
            videos[i].addEventListener("playing", function(event) {
                event.target.pause();
                event.target.currentTime = 0;
                if(window.internals)
                    internals.mediaPlayerRemoteRouteAvailabilityChanged(event.target, true);
            });
            videos[i].play();
        }
    });
    setSrcByTagName('video', '../content/test.ogv');
  </script>
</body>
</html>
